﻿///***************************************************************
/// 시  스  템 : Updms.Com.Dac
/// 단위시스템 : COM
/// 계      층 : Data Access Layer
/// 프로그램명 : Com_Dac_UPDMS_COM_PGM_GRID_COLUMN
/// 파  일  명 : Com_Dac_UPDMS_COM_PGM_GRID_COLUMN.cs
/// 설      명 : 그리드컬럼 정보관리
///***************************************************************
/// 수정ID 일자       이름     내용
///---------------------------------------------------------------
/// CH001  2011-01-12 송시명   최초 작성
///***************************************************************
using System.Data;
using System.Data.SqlClient;
using System.EnterpriseServices;
using System.Runtime.InteropServices; 

using SMFramework.Data;


namespace Updms.Com.Dac
{
	[ComVisible(true)]
	[Transaction(TransactionOption.Supported)]
	[JustInTimeActivation(true)]
	public class Com_Dac_UPDMS_COM_PGM_GRID_COLUMN : Base.AppFramework.DacBase
	{
		public Com_Dac_UPDMS_COM_PGM_GRID_COLUMN()
		{
		}

		#region NT [GetColumnListByPgmIdNGridId]
		/// <summary>
		/// 프로그램별 그리드별 컬럼정보 조회
		/// </summary>
		/// <param name="lo_dp"></param>
		/// <returns></returns>
		[AutoComplete]
		public DataSet GetColumnListByPgmIdNGridId(DataPack lo_dp)
		{
			string ls_sql = "usp_UPDMS_COM_PGM_GRID_COLUMN_Get_Column_List_By_Pgm_Id_N_Grid_Id";

			SqlParameter[] paramArray = lo_dp.ToSqlParameters();

			DataSet ds = new DataSet();
			return _agent.Fill(ls_sql, "UPDMS_COM_PGM_GRID_COLUMN", ds, paramArray, CommandType.StoredProcedure);
		}
		
		#endregion		

		#region RT [Insert]

		[AutoComplete]
		public int Insert(string ls_xml)
		{
			string strSql = "usp_UPDMS_COM_PGM_GRID_COLUMN_Insert";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_xml", ls_xml)
			};

			return _agent.ExecuteNonQuery(strSql, paramArray, CommandType.StoredProcedure);
		}

		#endregion		

		#region RT [Delete]

		[AutoComplete]
		public int Delete(string ls_xml)
		{
			string ls_sql = "usp_UPDMS_COM_PGM_GRID_COLUMN_Delete";

			SqlParameter[] paramArray =
			{
				new SqlParameter("ls_xml", ls_xml)
			};

			return _agent.ExecuteNonQuery(ls_sql, paramArray, CommandType.StoredProcedure);
		}

		#endregion
	}
}
